package model.components;

public class ComponentSensor extends Component {
	private int mode = 0; // 0: passive, 1: active
	protected Object componentReference;

	public ComponentSensor(String pLabel, int pMode, Object pComponentReference) {
		super(pLabel, 1); // true for state means that the sensor is active
		mode = pMode;
		componentReference = pComponentReference;
	}

	/**
	 * @return the mode
	 */
	public int getMode() {
		return mode;
	}

	/**
	 * @param pMode
	 *            the mode to set
	 */
	public void setMode(int pMode) {
		mode = pMode;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return super.toString() + " ComponentSensor [mode=" + mode + ", componentReference=" + componentReference + "]";
	}

}
